package edu.lfsfxy.dao;

import edu.lfsfxy.entity.Meet;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MeetDao {
    @Insert("insert into meetingroom values(null,#{meeting_name},#{meeting_order},#{advance_name})")
    int add(Meet m);
    @Select("select * from meetingroom")
    List<Meet> select();
    @Select("select id,meeting_name from meetingroom")
    List<Meet> selectName();
    @Select("select * from meetingroom where id=#{id}")
    Meet selectN(Meet m);
    @Delete("delete from meetingroom where id=#{id}")
    int delete(Meet meet);
    @Update("update meetingroom set meeting_name=#{meeting_name},meeting_order=#{meeting_order},advance_name=#{advance_name}")
    int update(Meet m);
}
